package com.report.dto.response;

import cn.zhxu.bs.bean.DbField;
import cn.zhxu.bs.bean.SearchBean;
import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.Data;

import java.time.LocalDateTime;

/**
 * @author summer
 * @date 2024-06-25 20:23
 */
@Data
@SearchBean(tables = " research_tag t   left join" +
        "    (SELECT  count(*) as reportNum,industry_id from research_report group by industry_id )  r ON t.id=r.industry_id",autoMapTo = "t",orderBy = "t.createTime DESC")
public class TagRes {

    @DbField("t.id")
    private Integer id;

    @DbField("t.name")
    private String name;

    @DbField("t.mark")
    private Integer mark;

    @DbField("r.reportNum")
    private Integer reportNum;

    @DbField("t.createTime")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss",timezone = "GMT+8")
    private LocalDateTime createTime;

    @DbField("t.deleted")
    private Integer deleted;
}
